#include "Task.h"
#include "Result.h"
#include <iostream>

void Task::exec() {
    if (auto res = result_.lock()) {
        res->setVal(run());
    }
}